<p class="breadcrumbs"><strong>You are here:</strong> &raquo; <a href="<?php echo $gene_uri ?>"><?php _e($gene_name) ?></a> 
&raquo; <a href="<?php echo Gene::makeLink(Gene::userId($profile['name'])) ?>"><?php _e($profile['name']) ?></a> &raquo; Edit Public Profile</p>

<h2>Edit Public Profile</h2>

<?php if ($success): ?>
	<p class="success"><strong>Your profile has been updated!</strong><br />You may <a href="<?php echo Gene::makeLink(Gene::userId($profile['name'])) ?>">view your updated profile</a> or continue to make further changes.</p>
<?php endif; ?>

<?php if ($member['user_id'] == $profile['user_id']): ?>
	<p>This changes your <a href="<?php echo Gene::makeLink(Gene::userId($profile['name'])) ?>">public profile</a>. Any changes will take affect immediately. All fields are optional.</p>
	
	<?php if ($imported): ?>
		<p><strong>We have imported your profile. Your profile has not yet been updated. Please review the profile below and make any changes as required.</strong></p>
	<?php else: ?>
		<form action="<?php echo Gene::makeLink(Gene::specialId('Import_Profile')); ?>" method="get">
		<fieldset>
		<legend>Profile Import</legend>
		<p>You can optionally choose to import your profile from a FOAF file.</p>
		
		<p><input type="radio" id="profileimportweb" name="type" value="website" /><label for="profileimportweb">Import a profile from another website</label>
		<br />
		<input type="radio" id="profileimportfile" name="type" value="file" /><label for="profileimportfile">Import a profile from a downloaded file</label></p>
		
		<p><input type="submit" value="Import my Profile"></p>
		
		</fieldset>
		</form>
	<?php endif; ?>
<?php else: ?>
	<p>This will modify the public profile of <a href="<?php echo Gene::makeLink(Gene::userId($profile['name'])) ?>"><?php _e($profile['name']) ?></a>. Any changes will take affect immediately. All fields are optional.</p>
<?php endif; ?>

<form action="<?php echo Gene::makeLink(Gene::userId($profile['name'])) ?>/edit" method="post">
<table style="width: 100%; border-spacing: 0;">
<tr>
	<td style="width: 150px;">Biography:</td>
	<td><textarea name="profilebio" cols="50" rows="8"><?php _e($profile['bio']) ?></textarea></td>
</tr>

<tr>
	<td style="width: 150px;">Gender:</td>
	<td><select name="profilegender">
		<option value="">None Specified</option>
		<option value="m"<?php if ($profile['gender'] == "m"): ?> selected="selected"<?php endif; ?>>Male</option>
		<option value="f"<?php if ($profile['gender'] == "f"): ?> selected="selected"<?php endif; ?>>Female</option>
	</select></td>
</tr>

<tr>
	<td style="width: 150px;">Location:</td>
	<td><input type="text" name="profilelocation" value="<?php _e($profile['location']) ?>" /></td>
</tr>

<tr>
	<td style="width: 150px;">Webpage:</td>
	<td><input type="text" name="profileurl" value="<?php _e($profile['homepage']) ?>" /></td>
</tr>

<tr>
	<td style="width: 150px;">Jabber <abbr title="Instant Messaging">IM</abbr>:</td>
	<td><input type="text" name="profilejabber" value="<?php _e($profile['jabber']) ?>" /></td>
</tr>

<tr><td class="formcontrols"></td><td class="formcontrols"><input type="submit" value="Update Profile" class="btn_focus" /></td></tr>
</table>



</form>